﻿using FluentNHibernate.Mapping;
using CsharpTrainer.NHibernate3.Entities;

namespace CsharpTrainer.NHibernate3.Mapping
{
    public class StudentMap : ClassMap<Student>
    {
        public StudentMap()
        {
            Id(x => x.StudentId, "StudentId");
            Map(x => x.StudentName)
                .Length(20)
                .Not.Nullable();
            Map(x => x.Age)
                .Not.Nullable();
        }
    }
}
